<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSCloudLessonInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s_cloud_lesson_info', function (Blueprint $table) {
            $table->increments('id');

            $table->string('title')->comment("云课堂标题")->index();
            $table->string('tags')->comment("标签");
            $table->text('desc')->comment("简介");
            $table->dateTime('lesson_time')->comment("课程时间");

            $table->integer('base_num')->comment("基础观看人数");
            $table->integer('look_num')->comment("实际观看人数");

            $table->integer('require_share_num')->comment("要求分享次数");
            $table->integer('share_num')->comment("实际分享次数");

            $table->string('res_url')->comment("资源地址");
            $table->string('poster')->comment("海报地址");
            $table->integer('original_price')->comment("原价,单位分");
            $table->integer('actual_price')->comment("现价,单位分");
            // $table->string('email')->unique();
            $table->integer('is_free')->comment("是否免费");
            $table->integer('is_recommend')->comment("是否推荐");

            $table->integer('admin_id')->comment("最后操作人");

            $table->timestamps();
            $table->SoftDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
